package com.gxa.mapper;

import com.gxa.domain.dto.CourseSaveDTO;
import com.gxa.domain.dto.CourseUpdateDTO;
import com.gxa.domain.entity.Course;
import com.gxa.domain.vo.CourseVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface CourseMapper {
    Course findCourseByCourseId(Integer courseId);

    int addCourse(CourseSaveDTO courseSaveDTO);

    int updateCourse(CourseUpdateDTO courseUpdateDTO);

    int delCourseByCourseId(Integer courseId);

    List<CourseVO> findCourseList(@Param("offset") Integer offset, @Param("rows") Integer rows);

    Integer countCourse();

    List<CourseVO> findCourseListByCondition(@Param("offset") Integer offset, @Param("rows") Integer rows,  @Param("coursename") String coursename);


    Integer countCourseByCondition(String coursename);
}
